x86/EPT: work around hardware erratum setting A bit
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Fri, 2 Oct 2015 11:39:12 +0000 (13:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 Oct 2015 11:39:12 +0000 (13:39 +0200)
commit33b55dc10342570aad77bd2fa221189df0ebca4e
tree1e01d5a789ee5d6239336b939168a0979dfa4e5c
parentc6e348570c80206fa17476e2feb4ac77371e4f10
x86/EPT: work around hardware erratum setting A bit

Since commit 191b3f3344ee ("p2m/ept: enable PML in p2m-ept for
log-dirty"), the A and D bits of EPT paging entries are set
unconditionally, regardless of whether PML is enabled or not. This
causes a regression in Xen 4.6 on some processors due to Intel Errata
AVR41 -- HVM guests get severe memory corruption when the A bit is set
due to incorrect TLB flushing on mov to cr3. The erratum affects the
Atom C2000 family (Avoton).

To fix, do not set the A bit on this processor family.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Move feature suppression to feature detection code. Add command line
override.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
docs/misc/xen-command-line.markdown
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/mm/p2m-ept.c
xen/include/asm-x86/hvm/vmx/vmx.h